<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateConsultTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('consult', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('')->comment('资讯标题');
            $table->string('cover')->default('')->comment('资讯封面图');
            $table->text('content')->comment('资讯内容');
            $table->dateTime('issue_time')->comment('发布时间');
            $table->tinyInteger('type')->comment('文章类型');
            $table->string('author')->default('')->comment('文章作者');
            $table->tinyInteger('status')->default('1')->comment('文章状态 0：关闭 1：开启');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('consult');
    }
}
